<%--
  Created by IntelliJ IDEA.
  User: 李凯
  Date: 2025/3/31
  Time: 15:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

${msg}
<form action="products" method="post">

    商品名称：<input type="text" name="name"><br>

    商品描述：<input type="text" name="description"><br>

    商品价格：<input type="text" name="price"><br>

    <input type="submit" value="添加">
</form>

<table >
    <tr>
        <th >商品ID</th>

        <th >商品名称</th>

        <th >商品描述</th>

        <th >商品价格</th>
    </tr>
    <c:forEach items="${products}" var="product">
        <tr>
            <td>${product.id}</td>
            <td>${product.name}</td>
            <td>${product.description}</td>
            <td>${product.price}</td>
        </tr>
    </c:forEach>
</table>





</body>
</html>
